DB2 10.5 for Linux, UNIX, and Windows

TO_DATE scalar function

The TO_DATE function returns a timestamp that is based on the interpretation of the input string using the specified format.

Read syntax diagramSkip visual syntax diagram
>>-TO_DATE--(--string-expression-------------------------------->

>--+---------------------------------------------------------------------+--)-><
   '-,--format-string--+-----------------------------------------------+-'      
                       | .-,--6------------------.                     |        
                       +-+-----------------------+--+----------------+-+        
                       | '-,--precision-constant-'  '-,--locale-name-' |        
                       |                 .-,--6------------------.     |        
                       '-,--locale-name--+-----------------------+-----'        
                                         '-,--precision-constant-'              

The schema is SYSIBM.

The TO_DATE scalar function is a synonym for the TIMESTAMP_FORMAT scalar function.